package com.restkeeper.service;

import com.alibaba.fastjson.JSONObject;
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
import com.restkeeper.dto.WechatRefundDto;
import com.restkeeper.dto.WxPayDto;
import com.restkeeper.entity.SysUser;
import com.restkeeper.model.WxPrepayResp;
import com.restkeeper.model.aliyun.SmsMessageDto;
import com.restkeeper.vo.UserInfoResponse;
import com.wechat.pay.java.core.notification.NotificationConfig;
import com.wechat.pay.java.service.partnerpayments.jsapi.model.Transaction;
import com.wechat.pay.java.service.payments.jsapi.model.PrepayResponse;
import com.wechat.pay.java.service.refund.model.Refund;
import com.wechat.pay.java.service.transferbatch.model.InitiateBatchTransferResponse;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.Map;

@Service
public interface CommonService {


    public JSONObject getACCESSInfo(String jsCode);

    public JSONObject ACCESS_TOKEN();
    /**
     * 发起微信下单，获取支付链接
     * */
    /**
     * 元转分
     * */
    public Integer amountToDivide(BigDecimal amount);

    SendSmsResponse sendSms(SmsMessageDto messageDto);


    String reply(Map<String, String> requestMap);

    NotificationConfig getRSAPublicKeyNotificationConfig();

    WxPrepayResp generateSignature(WxPayDto payDto);


    /**
     * 微信退款方法
     */
    Refund wechatRefund(WechatRefundDto dto);

    void rechargeSuccess(Transaction transaction);

    void updateBalance(SysUser user, BigDecimal income, String foreignKey, Integer target);

    JSONObject getDouyinUserBasicInfoByCode(String code);

    UserInfoResponse getDouyinUserDetailInfo(String openid, String accessToken);

    String getDyAccessToken();

}
